<template>
<div class="app">
  <TabControl :titles="['衣服','鞋子','裤子']" v-on="{'tabItemClick':payload=>tabItemClick(payload)}">
    <template v-slot:default="props">
      <button>{{props}}</button>
    </template>
  </TabControl>
</div>
</template>

<script>
import TabControl from './TabControl.vue'
export default {
  name: "App",
  components:{
    TabControl
  },
  data(){
    return{
      pageContents:['衣服列表','鞋子列表','裤子列表'],
      currentIndex:0
    }
  },
  methods:{
    tabItemClick(index){
      console.log('tabItemClick-index:',index)
      this.currentIndex=index
    }
  }
}
</script>

<style scoped>

</style>